import { FC } from 'react'
import { Typography, Input } from 'antd'
import PropComponent from './PropComponent'
const { Paragraph } = Typography
const { TextArea } = Input

export type propsType = {
  text?: string
  placeholder?: string
  disabled?: boolean
}
const questionTextarea: FC<propsType> = props => {
  const { placeholder = '请输入...', text = '多行输入框标题' } = props
  return (
    <div>
      <Paragraph strong>{text}</Paragraph>
      <div>
        <TextArea autoSize={{ minRows: 2 }} placeholder={placeholder} />
      </div>
    </div>
  )
}

export const questionTextareaConfig = {
  title: '多行文本输入框',
  type: 'questionTextarea',
  PropComponent,
  Component: questionTextarea,
}

export default questionTextarea
